import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            component: require('./views/Main.vue').default,
            children:[
                {
                    path: '/',
                    name: 'home',
                    component: ()=>import('./views/Home.vue')
                },
                {
                    path: '/commodity',
                    name: 'commodity',
                    component: ()=>import('./views/Commodity.vue')
                },
                {
                    path: '/bill',
                    name: 'bill',
                    component: ()=>import('./views/Bill.vue')
                },
                {
                    path: '/member',
                    name: 'member',
                    component: ()=>import('./views/Member.vue')
                },
            ]
        },
        {
            path: '/about',
            name: 'about',
            component: ()=>import('./views/About.vue')
        },
        {
            path: '/classList',
            name: 'classList',
            component: ()=>import('./views/ClassList.vue')
        },
        {
            path: '/addCom',
            name: 'addCom',
            component: ()=>import('./views/AddCom.vue')
        },







        {
            path: '*',
            name: 'notFound',
            component: ()=>import('./views/NotFound.vue')
        }
    ]
})
